<template>
  <div>
    <!-- 导航栏 -->
    <van-nav-bar
      title="用户隐私"
      left-arrow
      :border="false"
      fixed
      @click-left="$utils.back($route.path);"
    />
    <div class="has-top"></div>

    <!-- 协议正文 -->
    <div class="content">
      <van-skeleton title :row="5" :loading="loading">
        <ul v-if="privacy">
          <li class="pb-30">
            <h3 class="fs-30">{{privacy.Title?privacy.Title:""}}</h3>
            <div class="fs-24" v-html="privacy.Content?privacy.Content:''"></div>
          </li>
        </ul>
        <div class="tac" v-if="!privacy">暂无相关内容</div>
      </van-skeleton>
    </div>
  </div>
</template>

<script>
import { getInfoByType } from 'api/agreement'
export default {
  data() {
    return {
      privacy: {},
      loading: true
    }
  },
  methods: {
    getInfoByType() {
      getInfoByType(2).then(res => {
        //console.log(res);
        if (res) {
          this.privacy = res.Data
          this.loading = false
        }
      })
    }
  },
  created() {
    this.getInfoByType()
  }
}
</script>

<style lang="scss" scoped>
.content {
  padding: 30px 40px;
  background: $colorBg;
}
</style>
